package bs.org.suite.tool;

import java.util.HashMap;
import java.util.Map;

import bs.org.suite.util.ExecBean;
import bs.org.suite.util.ExecLoader;
import bs.org.suite.util.OSInfo;

/**
 * @author baishui2004
 * @version 1.0
 */
public final class JNotifyLoadLibrary {

	public static void loadLibrary() {
		ExecBean execBean = new ExecBean();
		execBean.setName("jnotify");
		execBean.setVersion("0.93");
		Map<String, String> execFilePathMap = new HashMap<String, String>();
		execFilePathMap.put(OSInfo.OS_WINDOWS_ARCH_X86, "/native/windows/x86/jnotify.dll");
		execFilePathMap.put(OSInfo.OS_WINDOWS_ARCH_AMD64, "/native/windows/amd64/jnotify_64bit.dll");
		execFilePathMap.put(OSInfo.OS_MAC_ARCH_I386, "/native/mac/libjnotify.dylib");
		execFilePathMap.put(OSInfo.OS_MAC_ARCH_PPC, "/native/mac/libjnotify.dylib");
		execFilePathMap.put(OSInfo.OS_MAC_ARCH_X86_64, "/native/mac/libjnotify.dylib");
		execFilePathMap.put(OSInfo.OS_LINUX_ARCH_I386, "/native/linux/libjnotify.so");
		execFilePathMap.put(OSInfo.OS_LINUX_ARCH_AMD64, "/native/linux/libjnotify.so");
		execBean.setExecFilePathMap(execFilePathMap);
		ExecLoader.initialize(execBean);
	}

}
